home *** CD-ROM | disk | FTP | other *** search
/ How Would You Survive? / How Would You Survive (1995)(Grolier)[Mac-PC].iso / mac / SHARED.DIR / 01951_Script_Viking Globals Buttons < prev    next >
Text File  |  1995-09-13  |  9KB  |  290 lines

  1. Global gBtn1, gBtn2, gBtn3, gBtn4, gBtn5, gBtn6, gBtn7, gBtn8, gBtn9, gBtn16, gBtn17, gQuest, gSlider,gTheHelpIsOn
  2.  
  3. on VInitBYLDemo
  4.   set gBtn4 = birth(script "aTheatreButton", 32, 140, "SV141000.AIF", "VBegin", "HandCursor")
  5. end
  6.  
  7. on VInitGlobals
  8.   set ScriptNumber = the number of cast "a3StateButton"
  9.   set gBtn1 = birth(script "aPullDown", 29, 125, 127, "SV140800.AIF", "VGlossary", "VIndex", "HandCursor")
  10.   set gBtn2 = birth(script ScriptNumber, 30, 134, "SV141700.AIF", "DoNothing", "HandCursor")
  11.   set gBtn3 = birth(script ScriptNumber, 31, 137, "SV141600.AIF", "DoNothing", "HandCursor")
  12.   set gBtn4 = birth(script ScriptNumber, 32, 140, "SV141000.AIF", "VBegin", "HandCursor")
  13.   set gBtn5 = birth(script ScriptNumber, 33, 143, "SV141100.AIF", "TableCross", "HandCursor")
  14.   set gBtn6 = birth(script 1983, 34, 146, 79, "VMap", "VTime", "VBasicFacts",¼
  15.                  "HowDoWeKnowCross", "HandCursor", "SV141200.AIF", "")
  16.   set gBtn7 = birth(script ScriptNumber, 35, 153, "SV141300.AIF", "VGame", "HandCursor")
  17.   set gBtn8 = birth(script ScriptNumber, 36, 156, "SV010252.AIF", "HelpToggle", "HandCursor")  
  18.   set gBtn9 = birth(script ScriptNumber, 37, 159, "SV141500.AIF", "Quitit", "HandCursor")
  19.   set gQuest = birth(script "aRandomQuestion", 44, 45, 148, 339, 173, 1501, 2, "","", "", "", 3, "SV143000.AIF")
  20.   SwitchList (gQuest, 3)
  21. end
  22.  
  23. on GlobalSetUpFromTheatre
  24.   set ScriptNumber = the number of cast "a3StateButton"
  25.   set gBtn1 = birth(script "aPullDown", 29, 125, 127, "SV140800.AIF", "VGlossary", "VIndex", "HandCursor")
  26.   set gBtn2 = birth(script ScriptNumber, 30, 134, "SV141700.AIF", "DoNothing", "HandCursor")
  27.   set gBtn3 = birth(script ScriptNumber, 31, 137, "SV141600.AIF", "DoNothing", "HandCursor")
  28.   set gBtn4 = birth(script ScriptNumber, 32, 140, "SV141000.AIF", "VBegin", "HandCursor")
  29.   set gBtn5 = birth(script ScriptNumber, 33, 143, "SV141100.AIF", "TableCross", "HandCursor")
  30.   set gBtn6 = birth(script 1983, 34, 146, 79, "VMap", "VTime", "VBasicFacts",¼
  31.                  "HowDoWeKnowCross", "HandCursor", "SV141200.AIF", "")
  32.   set gBtn7 = birth(script ScriptNumber, 35, 153, "SV141300.AIF", "VGame", "HandCursor")
  33.   set gBtn8 = birth(script ScriptNumber, 36, 156, "SV010252.AIF", "HelpToggle", "HandCursor")  
  34.   set gBtn9 = birth(script ScriptNumber, 37, 159, "SV141500.AIF", "Quitit", "HandCursor")
  35.   SwitchList (gQuest, 3)
  36. end
  37.  
  38. on VGlobalsSetUp
  39.   setNewFunctions (gBtn1, "VGlossary", "VIndex")
  40.   setNewFunction (gBtn4, "VBegin")
  41.   setNewFunction (gBtn5, "Table")
  42.   setNewFunctions (gBtn6, "VMap", "VTime", "VBasicFacts", "HowDoWeKnow")
  43.   setNewFunction (gBtn7, "VGame")
  44.   setNewFunction (gBtn8, "HelpToggle")
  45.   SwitchList (gQuest, 3)
  46. end
  47.  
  48. on VGlobalsSetUpGlossary
  49.   setNewFunctions (gBtn1, "DoNothing", "VIndex")
  50.   setNewFunction (gBtn2, "VBegin")
  51.   setNewFunction (gBtn3, "VIndex")
  52.   setNewFunction (gBtn4, "VBegin")
  53.   setNewFunction (gBtn5, "TableCross")
  54.   setNewFunctions (gBtn6, "VMap", "VTime", "VBasicFacts", "HowDoWeKnowCross")
  55.   setNewFunction (gBtn7, "VGame")
  56.   setNewFunction (gBtn8, "HelpToggle")
  57.   SwitchList (gQuest, 3)
  58. end
  59.  
  60. on VGlobalsSetUpIndex
  61.   setNewFunctions (gBtn1, "VGlossary", "DoNothing")
  62.   setNewFunction (gBtn2, "VGlossary")
  63.   setNewFunction (gBtn3, "VBegin")
  64.   setNewFunction (gBtn4, "VBegin")
  65.   setNewFunction (gBtn5, "TableCross")
  66.   setNewFunctions (gBtn6, "VMap", "VTime", "VBasicFacts", "HowDoWeKnowCross")
  67.   setNewFunction (gBtn7, "VGame")
  68.   setNewFunction (gBtn8, "HelpToggle")
  69.   SwitchList (gQuest, 3)
  70. end
  71.  
  72. on VGlobalsSetUpPan
  73.   setNewFunctions (gBtn1, "VGlossary", "VIndex")
  74.   setNewFunction (gBtn4, "DoNothing")
  75.   setNewFunction (gBtn5, "TableCross")
  76.   setNewFunctions (gBtn6, "VMap", "VTime", "VBasicFacts", "HowDoWeKnowCross")
  77.   setNewFunction (gBtn7, "VGame")
  78.   setNewFunction (gBtn8, "HelpToggle")
  79.   SwitchList (gQuest, 3)
  80. end
  81.  
  82. on VGlobalsSetUpMap
  83.   setNewFunctions (gBtn1, "VGlossary", "VIndex")
  84.   setNewFunction (gBtn4, "VBegin")
  85.   setNewFunction (gBtn5, "TableCross")
  86.   setNewFunctions (gBtn6, "ResetVMaps", "VTime", "VBasicFacts", "HowDoWeKnowCross")
  87.   setNewFunction (gBtn7, "VGame")
  88.   setNewFunction (gBtn8, "HelpToggle")
  89.   SwitchList (gQuest, 3)
  90. end
  91.  
  92. on VGlobalsSetUpTime
  93.   setNewFunctions (gBtn1, "VGlossary", "VIndex")
  94.   setNewFunction (gBtn4, "VBegin")
  95.   setNewFunction (gBtn5, "TableCross")
  96.   setNewFunctions (gBtn6, "VMAP", "DoNothing", "VBasicFacts", "HowDoWeKnowCross")
  97.   setNewFunction (gBtn7, "VGame")
  98.   setNewFunction (gBtn8, "HelpToggle")
  99.   SwitchList (gQuest, 3)
  100. end
  101.  
  102. on VGlobalsSetUpBF
  103.   setNewFunctions (gBtn1, "VGlossary", "VIndex")
  104.   setNewFunction (gBtn4, "VBegin")
  105.   setNewFunction (gBtn5, "TableCross")
  106.   setNewFunctions (gBtn6, "VMap", "VTime", "DoNothing", "HowDoWeKnowCross")
  107.   setNewFunction (gBtn7, "VGame")
  108.   setNewFunction (gBtn8, "HelpToggle")
  109.   SwitchList (gQuest, 3)
  110. end
  111.  
  112. on VGlobalsSetUpGame
  113.   setNewFunctions (gBtn1, "VGlossary", "VIndex")
  114.   setNewFunction (gBtn4, "VBegin")
  115.   setNewFunction (gBtn5, "TableCross")
  116.   setNewFunctions (gBtn6, "VMap", "VTime", "VBasicFacts", "HowDoWeKnowCross")
  117.   setNewFunction (gBtn7, "DoNothing")
  118.   setNewFunction (gBtn8, "HelpToggle")
  119.   SwitchList (gQuest, 3)
  120. end
  121.  
  122.  
  123. on VGlobalRollover
  124.   RolloverJob(gQuest)
  125.   if (the MouseV < 250) then
  126.     if hilightPullDown (gBtn1) then 
  127.       return true
  128.     else
  129.       if ObjectP(gBtn16) then
  130.         if hilight (gBtn16) then 
  131.           return true
  132.         else
  133.           if ObjectP(gBtn17) then
  134.             if hilight (gBtn17) then 
  135.               return true
  136.             end if
  137.           end if
  138.         end if
  139.       end if
  140.     end if
  141.   else
  142.     if rollover(38) then
  143.       if gTheHelpIsOn = 1 then
  144.         puppetsound "SV142100.AIF"
  145.         updatestage
  146.         repeat while rollover(38)
  147.           nothing
  148.         end repeat
  149.       end if
  150.     else
  151.       if hilight (gBtn2) then 
  152.         return true
  153.       else
  154.         if hilight (gBtn3) then 
  155.           return true
  156.         else
  157.           if hilight (gBtn4) then 
  158.             return true
  159.           else
  160.             if hilight (gBtn5) then 
  161.               return true
  162.             else
  163.               if hilight (gBtn6) then 
  164.                 return true
  165.               else
  166.                 if hilight (gBtn7) then 
  167.                   return true
  168.                 else
  169.                   if hilight (gBtn8) then 
  170.                     return true
  171.                   else
  172.                     if hilight (gBtn9) then 
  173.                       return true
  174.                     else
  175.                       return false
  176.                     end if
  177.                   end if
  178.                 end if
  179.               end if
  180.             end if
  181.           end if
  182.         end if
  183.       end if
  184.     end if
  185.   end if
  186. end
  187.  
  188. on VGlobalRollover2
  189.   RolloverJob(gQuest)
  190.   if (the MouseV < 250) then
  191.     if hilightPullDown (gBtn1) then 
  192.       return true
  193.     else
  194.       if ObjectP(gBtn16) then
  195.         if hilight (gBtn16) then 
  196.           return true
  197.         else
  198.           if ObjectP(gBtn17) then
  199.             if hilight (gBtn17) then 
  200.               return true
  201.             end if
  202.           end if
  203.         end if
  204.       end if
  205.     end if
  206.   else
  207.     if rollover(38) then
  208.       if gTheHelpIsOn = 1 then
  209.         puppetsound "SV142100.AIF"
  210.         updatestage
  211.         repeat while rollover(38)
  212.           nothing
  213.         end repeat
  214.       end if
  215.     else
  216.       if donthilight (gBtn2) then 
  217.         return true
  218.       else
  219.         if donthilight (gBtn3) then 
  220.           return true
  221.         else
  222.           if hilight (gBtn4) then 
  223.             return true
  224.           else
  225.             if hilight (gBtn5) then 
  226.               return true
  227.             else
  228.               if hilight (gBtn6) then 
  229.                 return true
  230.               else
  231.                 if hilight (gBtn7) then 
  232.                   return true
  233.                 else
  234.                   if hilight (gBtn8) then 
  235.                     return true
  236.                   else
  237.                     if hilight (gBtn9) then 
  238.                       return true
  239.                     else
  240.                       return false
  241.                     end if
  242.                   end if
  243.                 end if
  244.               end if
  245.             end if
  246.           end if
  247.         end if
  248.       end if
  249.     end if
  250.   end if
  251. end
  252.  
  253. on TurnOffPuppetTemp
  254.   hideControl (gBtn1)
  255.   hideControl (gBtn2)
  256.   hideControl (gBtn3)
  257.   hideControl (gBtn4)
  258.   hideControl (gBtn5)
  259.   hideControl (gBtn6)
  260.   hideControl (gBtn7)
  261.   hideControl (gBtn8)
  262.   hideControl (gBtn9)
  263. end
  264.  
  265.  
  266. on TurnOnPuppetTemp
  267.   showControl (gBtn1)
  268.   showControl (gBtn2)
  269.   showControl (gBtn3)
  270.   showControl (gBtn4)
  271.   showControl (gBtn5)
  272.   showControl (gBtn6)
  273.   showControl (gBtn7)
  274.   showControl (gBtn8)
  275.   showControl (gBtn9)
  276. end
  277.  
  278. on InitSoundsV
  279.   setnewsound (gBtn1, "SV140800.AIF")
  280.   setnewsound (gBtn2, "SV141700.AIF")
  281.   setnewsound (gBtn3, "SV141600.AIF")
  282.   setnewsound (gBtn4, "SV141000.AIF")
  283.   setnewsound (gBtn5, "SV141100.AIF")
  284.   setnewsound (gBtn6, "SV141200.AIF")
  285.   setnewsound (gBtn7, "SV141300.AIF")
  286.   setnewsound (gBtn8, "SV010252.AIF")
  287.   setnewsound (gBtn9, "SV141500.AIF")
  288.   setnewsound (gQuest, "SV143000.AIF")
  289. end
  290.